package xyz.duolaf.myboot.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xyz.duolaf.myboot.pojo.Area;
import xyz.duolaf.myboot.service.AreaService;

import java.util.List;

@RestController
public class AreaController {

    @Autowired
    private AreaService areaService;

    @RequestMapping("/areaList")
    public List<Area> getAreaList() {
        List<Area> areaList = areaService.getAreaList();
        return areaList;
    }
}
